home *** CD-ROM | disk | FTP | other *** search
- <%
- on error resume next
- dim SecurityBox
- if (Session("Index") <> "Index") then 'add your session management code here
- Response.Redirect "index.asp"
- elseif ((Request.QueryString("FileName") <> "") and (Request.QueryString("Return") <> "")) then
- set File = Server.CreateObject("Scripting.FileSystemObject")
- File.DeleteFile(Request.QueryString("FileName"))
- set File = nothing
- Response.Redirect(Request.QueryString("Return"))
- else
- if ((Request.QueryString("WebSiteName") = "") or (Request.QueryString("Path") = "") or (Request.QueryString("Return") = "")) then
- Session("Index") = ""
- Session("Error") = ""
- Response.Redirect("index.asp") 'default redirection
- else
- set File = Server.CreateObject("Scripting.FileSystemObject")
- if (not File.FolderExists(Request.QueryString("Path"))) then
- Session("Error") = "Path " & Request.QueryString("Path") & " does not exist, please supply valid path for ASPFusion Security Box " & Request.QueryString("WebSiteName")
- set File = nothing
- Response.Redirect(Request.QueryString("Return"))
- end if
- set File = nothing
- set SecurityBox = Server.CreateObject("AdvFusionBox.FusionBox")
- set Result = SecurityBox.ReturnValues("Admin.ini", "Settings", "Applied")
- if (SecurityBox.IsError = 1) then
- Session("Error") = SecurityBox.ErrorReason
- set SecurityBox = nothing
- Response.Redirect(Request.QueryString("Return"))
- end if
- set Rst = SecurityBox.GetRegVal("", "InstallationPath", "String")
- if (SecurityBox.IsError = 1) then
- Session("Error") = SecurityBox.ErrorReason
- set Result = nothing
- set SecurityBox = nothing
- Response.Redirect(Request.QueryString("Return"))
- end if
- set File = Server.CreateObject("Scripting.FileSystemObject")
- ActText = vbCrLf & "%" & ">"
- for each Member in Result
- ActFileName = Rst.Value & "\Admin\act_automate_" & Member.Value & ".asp"
- if (File.FileExists(ActFileName)) then
- ActText = ActText & vbCrLf & "<!--- #include file = 'act_automate_" & Member.Value & ".asp' --->"
- end if
- next
- set File = nothing
- set Result = nothing
- ActText = ActText & vbCrLf & "<" & "%"
- TargetPath = SecurityBox.UniqueFileName(Rst.Value & "\Admin\act_automate.asp", 1)
- if (SecurityBox.IsError = 1) then
- Session("Error") = SecurityBox.ErrorReason
- set Rst = nothing
- set SecurityBox = nothing
- Response.Redirect(Request.QueryString("Return"))
- end if
- SecurityBox.Insert TargetPath, ActText, "'ASP Include Start Mark", "'ASP Include End Mark"
- if (SecurityBox.IsError = 1) then
- Session("Error") = SecurityBox.ErrorReason
- set Rst = nothing
- set SecurityBox = nothing
- Response.Redirect(Request.QueryString("Return"))
- end if
- TargetFile = mid(TargetPath,len(Rst.Value)+8,len(TargetPath))
- set Rst = nothing
- set SecurityBox = nothing
- Response.Redirect(TargetFile&"?WebSiteName="&Replace(Request.QueryString("WebSiteName"), " ", "%20")&"&Path="&Replace(Request.QueryString("Path"), " ", "%20")&"&Return="&Replace(Request.QueryString("Return"), " ", "%20")&"&FileName="&Replace(TargetPath, " ", "%20"))
- end if
- end if
- %>